package team.freeroom.hotelmanage.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import team.freeroom.hotelmanage.repository.entity.Checkin;
import team.freeroom.hotelmanage.repository.mapper.CheckinMapper;
import team.freeroom.hotelmanage.service.CheckinService;
import java.util.List;
import java.util.Map;

@Service
public class CheckinServiceImpl implements CheckinService {
    @Autowired
    private CheckinMapper checkinMapper;

    @Override
    public int add(Checkin checkin) {
        return checkinMapper.add(checkin);
    }

    @Override
    public int edit(Checkin checkin) {
        return checkinMapper.edit(checkin);
    }

    @Override
    public int delete(Long id) {
        return checkinMapper.delete(id);
    }

    @Override
    public List<Checkin> findList(Map<String, Object> queryMap) {
        return checkinMapper.findList(queryMap);
    }

    @Override
    public Checkin find(Long id) {
        return checkinMapper.find(id);
    }

    @Override
    public List<Map> getStatsByMonth() {
        return checkinMapper.getStatsByMonth();
    }

    @Override
    public List<Map> getStatsByDay() {
        return checkinMapper.getStatsByDay();
    }

    @Override
    public Integer getTotal(Map<String, Object> queryMap) {
        return checkinMapper.getTotal(queryMap);
    }
}
